Ext.ns("Tk");
Tk.App= Ext.extend(Ext.Viewport, {
		layout: 'border'
		,initComponent:function()
		{
			var config={
				items:[
						{
							region: 'north',
							html: '<h1 class="x-panel-header">Page Title</h1>',
							height: 20,
							border: false,
							margins: '0 0 5 0'
						}
						 , {
							 title: '系统操作菜单',
							 region: 'west',
							 id: 'WetTree',
							 collapsible: true,
							 autoScroll: true,
							 split: true,
							 width:140,
							 xtype: 'panel',
							 layout: 'accordion',
							 items: [
								new Ext.Panel({title:"adsf", collapsible:true, titleCollapse:false, collapsed:true})
							 ]
						 },
						{
							id:		"DesckApp",
							region: 'center',
							xtype: 'tabpanel',
							items:[
									{html:'script', title: '桌面'},
									{title: 'Long Text',items:[new Ext.Button({text:"BUTTON"})]}
								   ]
						}, {
							region: 'south',
							title: '版权所有!禁止抄袭。',
							collapsible: true,
							html: 'Information goes here',
							split: true,
							height: 100,
							minHeight: 100,
							items: [
									new Ext.Button({ text: "增加TAB", width: 200,onClick:function()
																								{
											 var tp =  Ext.getCmp('DesckApp');
											 var tab = tp.add({
											 title:'Active Grid'
											 ,html:'examplegrid'
											 ,autoScroll:true
											});
											 tp.setActiveTab(tab);
																									
																								}
																								})
									]
					}
			]}
			Ext.apply(this, Ext.apply(this.initialConfig, config)); 
			Tk.App.superclass.initComponent.apply(this, arguments);
			}
			///功能模块加载的数据地址。
			,MUrl:"adfadsf"
			,onRender:function()
			{
			///处理加载	
				alert(this.MTree);
			}
			
			


 })


///注册自定义组件
Ext.reg('Tk.App', Tk.App);
